﻿<%@ Page Language="C#" MasterPageFile="~/RightFrame.Master" AutoEventWireup="true" CodeBehind="OperateLog.aspx.cs" Inherits="MyOA.UI.SysManage.OperateLog" Title="无标题页" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="../UserControl/UserCalender.ascx" tagname="UserCalender" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphTitle" runat="server">
 你的位置：登陆日志
 <style type="text/css">
 /*********用的是loginLog.css的样式***********/
 </style>
    <script type="text/javascript">
        var Alert=ymPrompt.alert;
        var Error=ymPrompt.errorInfo;
        var startTime,endTime;
       function btnSearchClick()
       {
           startTime=document.getElementById("ctl00_cphContnent_UserCalender1_txtStart");
           endTime=document.getElementById("ctl00_cphContnent_UserCalender1_txtEnd");
           if(startTime.value=="")
           {
                Alert("开始时间不能为空",null,null,"温馨提示",startFocus);
                return false;
           }
           if(endTime.value=="")
           {
                Alert("结束时间不能为空",null,null,"温馨提示",endFocus);
                return false;
           }
            return true;
       }
       function startFocus()
       {
            startTime.focus();
       }
       function endFocus()
       {
            endTime.focus();
       }
       
       function checkBoxClick(allCheckBox)
       {
       
         var checkbox=document.getElementsByTagName("input");
         for(var j=0;j<checkbox.length;j++)
         {
            if(checkbox[j].type=="checkbox")
            {
                
                checkbox[j].checked=allCheckBox.checked;
               
            }
         }
       }
       
       function cbOperateLogClick(check)
       {
            if(check.checked==false)
            {
                
                document.getElementById("cbAll").checked=false;
            }
            
       }
       var textbox;
       function linkbtnAllDeleteClick()
       {
            var result=confirm("确实要删除吗？");
           if(result)
           {
                textbox=document.getElementById("<%=txtIds.ClientID %>").value;
                textbox="";
                 var checkbox=document.getElementsByTagName("input");
                 for(var j=0;j<checkbox.length;j++)
                 {
                    if(checkbox[j].type=="checkbox"&&checkbox[j].id!="cbAll")
                    {
                        if(checkbox[j].checked)
                        {
                           
                            textbox+=checkbox[j].value+",";
                           
                         }
                     }
                   } 
                   if(textbox=="")
                   {
                        Alert("请你选中要删除的项",null,null,"温馨提示");
                        return false;
                   }
                   document.getElementById("<%=txtIds.ClientID %>").value=textbox;
                    return true;
              }
              else
              {
                return false;
              }
         }  
       
       </script>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContnent" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" >
        <ContentTemplate>
     <div class="body_title">登&nbsp;&nbsp;陆&nbsp;&nbsp;日&nbsp;&nbsp;志</div>
     <div class="body_content">
        <div class="body_top">
            <span>
                <uc1:UserCalender ID="UserCalender1" runat="server" />
            </span>
            
            <span class="spanButton">
                <asp:Button ID="btnSearch" runat="server" Text="搜索" CssClass="btn" 
                onMouseOver="document.getElementById(this.id).className='btnOver'" 
                onMouseOut="document.getElementById(this.id).className='btnOut'" onclick="btnSearch_Click"
                   OnClientClick="return btnSearchClick()" />
            
            </span>
        </div>
        
        <div style="margin-top:40px;"><hr /></div>
        <div class="body_title" style="font-size:14px; margin-top:-15px;">搜索结果</div>
        <div style="text-align:center; margin-top:30px;">
           <div id="divSchedule" runat="server">
           <table cellpadding="0" cellspacing="1" bgcolor="#CECECE">
            <asp:Repeater ID="rpLoginLog" runat="server">
                <HeaderTemplate>
                <tr style="margin:0px">
                    <td height="26" background="../../images/tab_14.gif" >
                        <asp:LinkButton ID="linkbtnAllDelete" runat="server"  OnClientClick="return linkbtnAllDeleteClick()" OnClick="linkbtnAllDelete_Click">删除</asp:LinkButton>
                        <input id="cbAll" type="checkbox" onclick="checkBoxClick(this);"/>
                    </td>
                    <td  background="../../images/tab_14.gif" >事件</td>
                    <td background="../../images/tab_14.gif" >操作成功与否</td>
                    <td  background="../../images/tab_14.gif" >操作时间</td>
                    <td  background="../../images/tab_14.gif" >操作号</td>
                    <td  background="../../images/tab_14.gif" >删除</td>
                    
              
                </tr>
            </HeaderTemplate>
            
            <ItemTemplate>
                  <tr onmousemove="this.style.backgroundColor='white';this.style.cursor='hand'" onmouseout="this.style.backgroundColor='#66CCFF'" bgcolor="#66CCFF" height="26">
                    <td width="15%">
                        
                        <input id="cbOperateLog" type="checkbox"   value='<%#Eval("operateid") %>' onclick="cbOperateLogClick(this)"/>
                     </td>
                    <td width="20%"><%#Eval("operatename") %></td>
                    <td width="15%"><%#Eval("operatedesc") %></td>
                    <td width="25%"><%#Eval("operatetime") %></td>
                    <td width="15%"><%#Eval("user.loginid") %></td>
                    <td width="10%">
                        <asp:LinkButton ID="linkbtnDelete" runat="server" CommandName='<%#Eval("operateid") %>' OnClientClick="return confirm('确实要删除吗？')" OnClick="linkbtnDelete_Click">删除</asp:LinkButton>
                    </td>
                   
                    
                </tr>
            </ItemTemplate>
            </asp:Repeater>
            
            </table>
           </div>
           
            <div style="text-align:center">
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" 
                        onpagechanged="AspNetPager1_PageChanged" PagingButtonSpacing="10px" 
                    ShowPageIndexBox="Always" PageIndexBoxType="DropDownList" PageSize="5" 
                    ShowNavigationToolTip="True" NavigationToolTipTextFormatString="转到第{0}页"
                        CssClass="paginator"  CurrentPageButtonClass="cpb" 
                    NumericButtonCount="5" >
                    </webdiyer:AspNetPager>
                
                <asp:HiddenField runat="server" ID="txtIds">
                </asp:HiddenField>
            </div>
        </div>
     </div>
     </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

